package com.varian.auth.model.dto;

import com.varian.tool.enums.CommonStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Map;
import java.util.Set;

/**
 * @author ben
 * @since 2024/6/27
 */
@Data
@Schema(title = "OAuth2客户端数据对象")
public class OAuth2RegisteredClientDTO {

    @Schema(title = "应用ID")
    @NotBlank(message = "应用ID不能为空")
    private String clientId;
    @Schema(title = "ID发放时间")
    private LocalDateTime clientIdIssuedAt;
    @Schema(title = "密钥")
    @NotBlank(message = "密钥不能为空")
    private String clientSecret;
    @Schema(title = "密钥过期时间")
    private LocalDateTime clientSecretExpiresAt;
    @Schema(title = "客户端名称")
    @NotBlank(message = "客户端名称不能为空")
    private String clientName;
    @Schema(title = "认证方式")
    private Set<String> clientAuthenticationMethods;
    @Schema(title = "授权类型")
    private Set<String> authorizationGrantTypes;
    @Schema(title = "重定向URI")
    private Set<String> redirectUris;
    @Schema(title = "登出后重定向URI")
    private Set<String> postLogoutRedirectUris;
    @Schema(title = "授权范围")
    private Set<String> scopes;
    @Schema(title = "客户端设置")
    private Map<String, Object> clientSettings;
    @Schema(title = "令牌设置")
    private Map<String, Object> tokenSettings;
    @Schema(title = "状态")
    private CommonStatusEnum clientStatus;
}
